package top.shaozuo.simple.spring.cloud.config.filesystem;

import java.util.HashMap;
import java.util.Map;

import org.springframework.cloud.bootstrap.config.PropertySourceLocator;
import org.springframework.core.env.Environment;
import org.springframework.core.env.MapPropertySource;
import org.springframework.core.env.PropertySource;

public class MyTestPropertySourceLocator implements PropertySourceLocator {
	@Override
	public PropertySource<?> locate(Environment environment) {
		Map<String, Object> propertySource = new HashMap<>();
		propertySource.put("user.name", "admin");
		MapPropertySource mapPropertySource = new MapPropertySource("customer", propertySource);

		return mapPropertySource;
	}
}